function ColumnChart(chartDiv,title,xAxisName,yAxisName,xunit,dataMap){
	this.chartDiv = chartDiv;
	this.title = title;
	this.xAxisName = xAxisName;
	this.yAxisName = yAxisName;
	this.xunit = xunit;
	this.dataMap = dataMap;
	this.prefix ="";
	this.chartString = "";
	this.labelMap=new Map();
};

ColumnChart.prototype.setPrefix = function(prefix){
	this.prefix = prefix;
};

ColumnChart.prototype.setLabelMap = function(labelMap){
	this.labelMap = labelMap;
};

ColumnChart.prototype.generateDataString = function(){
	this.chartString ="<chart palette='3' baseFontSize='12' caption='"+this.title+"' xAxisName='"+this.xAxisName+"' yAxisName='"+this.yAxisName+"' showValues='0' formatNumber='0' formatNumberScale='0' decimalPrecision='2'>";
		var array = this.dataMap;
	    for(var key in array){
	    	var value = this.dataMap[key];
	    	var xlabel = key;
	    	if(this.prefix!=""){
		    		xlabel = xlabel.replace(this.prefix,"");
		    }
	    	if(this.labelMap.isEmpty()){
		    	xlabel = xlabel+this.xunit; 
	    	}else{
	    		xlabel = this.labelMap.get(xlabel);
	    	}
	       this.chartString +="<set label='"+xlabel+"' value='"+value+"'/>";
	    }
	this.chartString+="</chart>";
}

ColumnChart.prototype.draw = function(){
	var chart = new FusionCharts("../static/FusionCharts/Column2D.swf", "LineChartId", "726", "400", "0", "0");
    this.generateDataString();
    chart.setXMLData(this.chartString);
    chart.render(this.chartDiv);
};

